// 引入api请求
import { requestSearchList } from '@/api'
const state = {
  searchList: {}
}
const mutations = {
  setSearchList(state, payload) {
    state.searchList = payload
  }
}
const actions = {
  // post请求
  async getSearchList({ commit }, params) {
    const res = await requestSearchList(params)
    commit('setSearchList', res)
  }
}
const getters = {
  trademarkList(state) {
    return state.searchList.trademarkList
  },
  attrsList(state) {
    return state.searchList.attrsList
  },
  goodsList(state) {
    return state.searchList.goodsList
  },
}
// 暴漏模块 
export default {
  // 命名空间namespaced
  namespaced: true,
  state,
  mutations,
  actions,
  getters
}